Key bindings

All HTML elements have their own key bindings. You can find them all in the HTML menu. I have tried to group them as much as possible so that they are easy to learn.

Other key bindings not found in the menu:

tabJump to the next tab mark ()
shift-tab  Jump to the previous tab mark ()
opt-tabLiteral tab
cmd-tabRemove all

shift-ctl-opt-,inserts <
shift-ctl-opt-.inserts >
shift-ctl-opt-7inserts &
shift-ctl-opt-space  inserts  

Defining your own key bindings

Any menu item in HTML mode can be bound to any single keystroke. The way to bind a function is with a statement such as:

bind 'c' <modifier string> {htmlMenuItem "submenu" "menu item"} HTML

where c is a character, <modifier string> is an optional string containing one or more of:

c - command modifier
o - option modifier
s - shift modifier
z - control modifier

For example, to bind 'Check Window' to ctrl-opt-W, use the statement

bind 'w' <zo> {htmlMenuItem "Check Links" "Check Window"} HTML

As another example, to bind 'Import Table...' to ctrl-shift-J, use the statement

bind 'j' <zs> {htmlMenuItem "Tables" "Import Table"} HTML

Such statements can be put in your HTML prefs file. Use Config -> Current Mode -> Edit Prefs. If a menu item ends with three dots ... the dots must be omitted in the above statement defining the key binding. If a menu item is renamed or moved in a later version of HTML mode, remember that you have to change your key bindings. For more information about key bindings, see the general manual for Alpha.

Command-double-click

Command-double-clicking on a color attribute brings up a color picker where you can change the color.

Command-double-clicking on an include tag opens the file.

Command-double-clicking on an absolute URL sends the URL to your web browser. This is not limited to HTML mode. It is a general feature of Alpha.

Command-double-clicking on a relative URL opens a new window with the file if the file exists and is a text file. If it does not exist, a dialog box appears as the one shown below. As you see, a new empty window can be opened with the name of the file. This window is automatically saved in the right place, and if necessary new folders are created. Thus, if you are making a new set of pages, you can make links to the ones you have not written yet and then, by cmd-double-clicking, let Alpha make empty files which are saved where you want them.